package com.testplatfrom.project.enumproject.environment;

/***
 * HTTP 路径匹配方式
 */
public enum HttpRoutePatchMethod {

    CONTAIN("CONTAIN","包含"),
    EQUALTO("EQUALTO","等于");
    private String httpRoutePatchMethod;
    private String msg;

    HttpRoutePatchMethod(String httpRoutePatchMethod, String msg) {
        this.httpRoutePatchMethod = httpRoutePatchMethod;
        this.msg = msg;
    }

    HttpRoutePatchMethod() {
    }

    public String getHttpRoutePatchMethod() {
        return httpRoutePatchMethod;
    }

    public void setHttpRoutePatchMethod(String httpRoutePatchMethod) {
        this.httpRoutePatchMethod = httpRoutePatchMethod;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "HttpRoutePatchMethod{" +
                "httpRoutePatchMethod='" + httpRoutePatchMethod + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }

    /**
     *
     * @param httpRoutePatchMethod
     * @return
     */
    public static HttpRoutePatchMethod getByValue(String httpRoutePatchMethod){
        for (HttpRoutePatchMethod assertMethodsType:values()){
            if (httpRoutePatchMethod.equals(assertMethodsType.getHttpRoutePatchMethod())){
                return assertMethodsType;
            }
        }
        return null;
    }
}
